﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Lucene.Net.Analysis.PanGu;
using Lucene.Net.Analysis;
using System.IO;

public partial class test_test分词 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Analyzer analyzer = new PanGuAnalyzer();
        //Analyzer analyzer = new CJKAnalyzer();
        //Analyzer analyzer = new StandardAnalyzer();
        TokenStream tokenStream = analyzer.TokenStream("", new StringReader(TextBox1.Text));
        Lucene.Net.Analysis.Token token = null;
        while ((token = tokenStream.Next()) != null)
        {
            Response.Write(token.TermText() + "<br/>");
            //Console.WriteLine(token.TermText());
        }
    }
}